#include <stdio.h>
#include <string.h>
#ifndef _CHARCODE_H
#define _CHARCODE_H
#define CHARCODE_NUM 253
typedef struct _CHARCODE
{
        char *dec;
        char *code;
        char *chr;
        char *desc;
}CHARCODE;
static CHARCODE charcodelist[] =
{
        {NULL, NULL, NULL, NULL},
                {"&#160;", "&nbsp;", " ", "no-break space"},
                {"&#161;", "&iexcl;", "¡", "inverted exclamation mark"},
                {"&#162;", "&cent;", "¢", "cent sign"},
                {"&#163;", "&pound;", "£", "pound sign"},
                {"&#164;", "&curren;", "¤", "currency sign"},
                {"&#165;", "&yen;", "¥", "yen sign = yuan sign"},
                {"&#166;", "&brvbar;", "¦", "broken bar = brolen vertical bar"},
                {"&#167;", "&sect;", "§", "section sign"},
                {"&#168;", "&uml;", "¨", "diaeresis = spacing diaeresis"},
                {"&#169;", "&copy;", "©", "copyright sign"},
                {"&#170;", "&ordf;", "ª", "feminine ordinal indicator"},
                {"&#171;", "&laquo;", "«", "left-pointing double angle quotation mark = left pointing guillemet"},
                {"&#172;", "&not;", "¬", "not sign = discretionary hyphen"},
                {"&#173;", "&shy;", "­", "soft hyphen = discretionary hyphen"},
                {"&#174;", "&reg;", "®", "registered sign = registered trade mark sign"},
                {"&#175;", "&macr;", "¯", "macron = spacing macron = overline = APL overbar"},
                {"&#176;", "&deg;", "°", "degree sign"},
                {"&#177;", "&plusmn;", "±", "plus-minus sign = plus-or-minus sign"},
                {"&#178;", "&sup2;", "²", "superscript two = superscript digit two = squared"},
                {"&#179;", "&sup3;", "³", "superscript three = superscript digit three = cubed"},
                {"&#180;", "&acute;", "´", "acute accent = spacing acute"},
                {"&#181;", "&micro;", "µ", "micro sign"},
                {"&#182;", "&para;", "¶", "pilcrow sign = paragraph sign"},
                {"&#183;", "&middot;", "·", "middle dot = Georgian comma = Greek middle dot"},
                {"&#184;", "&ccedil;", "¸", "cedilla = spacing cedilla"},
                {"&#185;", "&sup1;", "¹", "superscript one = superscript digit one"},
                {"&#186;", "&ordm;", "º", "masculine ordinal indicator"},
                {"&#187;", "&raquo;", "»", "right-pointing double angle quotation mark = right pointing guillemet"},
                {"&#188;", "&frac14;", "¼", "vulgar fraction one quarter = fraction one quarter"},
                {"&#189;", "&frac12;", "½", "vulgar fraction one half = fraction one half"},
                {"&#190;", "&frac34;", "¾", "vulgar fraction three quarters = fraction three quarters"},
                {"&#191;", "&iquest;", "¿", "inverted question mark = turned question mark"},
                {"&#192;", "&Agrave;", "À", "latin capital letter A with grave = latin capital letter A grave"},
                {"&#193;", "&Aacute;", "Á", "latin capital letter A with acute"},
                {"&#194;", "&Acirc;", "Â", "latin capital letter A with circumflex"},
                {"&#195;", "&Atilde;", "Ã", "latin capital letter A with tilde"},
                {"&#196;", "&Auml;", "Ä", "latin capital letter A with diaeresis"},
                {"&#197;", "&Aring;", "Å", "latin capital letter A with ring above = latin capital letter A ring"},
                {"&#198;", "&AElig;", "Æ", "latin capital letter AE = latin capital ligature AE"},
                {"&#199;", "&Ccedil;", "Ç", "latin capital letter C with cedilla"},
                {"&#200;", "&Egrave;", "È", "latin capital letter E with grave"},
                {"&#201;", "&Eacute;", "É", "latin capital letter E with acute"},
                {"&#202;", "&Ecirc;", "Ê", "latin capital letter E with circumflex"},
                {"&#203;", "&Euml;", "Ë", "latin capital letter E with diaeresis"},
                {"&#204;", "&Igrave;", "Ì", "latin capital letter I with grave"},
                {"&#205;", "&Iacute;", "Í", "latin capital letter I with acute"},
                {"&#206;", "&Icirc;", "Î", "latin capital letter I with circumflex"},
                {"&#207;", "&Iuml;", "Ï", "latin capital letter I with diaeresis"},
                {"&#208;", "&ETH;", "Ð", "latin capital letter ETH"},
                {"&#209;", "&Ntilde;", "Ñ", "latin capital letter N with tilde"},
                {"&#210;", "&Ograve;", "Ò", "latin capital letter O with grave"},
                {"&#211;", "&Oacute;", "Ó", "latin capital letter O with acute"},
                {"&#212;", "&Ocirc;", "Ô", "latin capital letter O with circumflex"},
                {"&#213;", "&Otilde;", "Õ", "latin capital letter O with tilde"},
                {"&#214;", "&Ouml;", "Ö", "latin capital letter O with diaeresis"},
                {"&#215;", "&times;", "×", "multiplication sign"},
                {"&#216;", "&Oslash;", "Ø", "latin capital letter O with stroke = latin capital letter O slash"},
                {"&#217;", "&Ugrave;", "Ù", "latin capital letter U with grave"},
                {"&#218;", "&Uacute;", "Ú", "latin capital letter U with acute"},
                {"&#219;", "&Ucirc;", "Û", "latin capital letter U with circumflex"},
                {"&#220;", "&Uuml;", "Ü", "latin capital letter U with diaeresis"},
                {"&#221;", "&Yacute;", "Ý", "latin capital letter Y with acute"},
                {"&#222;", "&THORN;", "Þ", "latin capital letter THORN"},
                {"&#223;", "&szlig;", "ß", "latin small letter sharp s = ess-zed"},
                {"&#224;", "&agrave;", "à", "latin small letter a with grave = latin small letter a grave"},
                {"&#225;", "&aacute;", "á", "latin small letter a with acute"},
                {"&#226;", "&acirc;", "â", "latin small letter a with circumflex"},
                {"&#227;", "&atilde;", "ã", "latin small letter a with tilde"},
                {"&#228;", "&auml;", "ä", "latin small letter a with diaeresis"},
                {"&#229;", "&aring;", "å", "latin small letter a with ring above = latin small letter a ring"},
                {"&#230;", "&aelig;", "æ", "latin small letter ae = latin small ligature ae"},
                {"&#231;", "&ccedil;", "ç", "latin small letter c with cedilla"},
                {"&#232;", "&egrave;", "è", "latin small letter e with grave"},
                {"&#233;", "&eacute;", "é", "latin small letter e with acute"},
                {"&#234;", "&ecirc;", "ê", "latin small letter e with circumflex"},
                {"&#235;", "&euml;", "ë", "latin small letter e with diaeresis"},
                {"&#236;", "&igrave;", "ì", "latin small letter i with grave"},
                {"&#237;", "&iacute;", "í", "latin small letter i with acute"},
                {"&#238;", "&icirc;", "î", "latin small letter i with circumflex"},
                {"&#239;", "&iuml;", "ï", "latin small letter i with diaeresis"},
                {"&#240;", "&eth;", "ð", "latin small letter eth"},
                {"&#241;", "&ntilde;", "ñ", "latin small letter n with tilde"},
                {"&#242;", "&ograve;", "ò", "latin small letter o with grave"},
                {"&#243;", "&oacute;", "ó", "latin small letter o with acute"},
                {"&#244;", "&ocirc;", "ô", "latin small letter o with circumflex"},
                {"&#245;", "&otilde;", "õ", "latin small letter o with tilde"},
                {"&#246;", "&ouml;", "ö", "latin small letter o with diaeresis"},
                {"&#247;", "&divide;", "÷", "division sign"},
                {"&#248;", "&oslash;", "ø", "latin small letter o with stroke = latin small letter o slash"},
                {"&#249;", "&ugrave;", "ù", "latin small letter u with grave"},
                {"&#250;", "&uacute;", "ú", "latin small letter u with acute"},
                {"&#251;", "&ucirc;", "û", "latin small letter u with circumflex"},
                {"&#252;", "&uuml;", "ü", "latin small letter u with diaeresis"},
                {"&#253;", "&yacute;", "ý", "latin small letter y with acute"},
                {"&#254;", "&thorn;", "þ", "latin small letter thorn with"},
                {"&#255;", "&yuml;", "ÿ", "latin small letter y with diaeresis"},
                {"&#402;", "&fnof;", "ƒ ", "latin small f with hook = function = florin"},
                {"&#913;", "&Alpha;", "Α ", "greek capital letter alpha"},
                {"&#914;", "&Beta;", "Β ", "greek capital letter beta"},
                {"&#915;", "&Gamma;", "Γ ", "greek capital letter gamma"},
                {"&#916;", "&Delta;", "Δ ", "greek capital letter delta"},
                {"&#917;", "&Epsilon;", "Ε ", "greek capital letter epsilon"},
                {"&#918;", "&Zeta;", "Ζ ", "greek capital letter zeta"},
                {"&#919;", "&Eta;", "Η ", "greek capital letter eta"},
                {"&#920;", "&Theta;", "Θ ", "greek capital letter theta"},
                {"&#921;", "&Iota;", "Ι ", "greek capital letter iota"},
                {"&#922;", "&Kappa;", "Κ ", "greek capital letter kappa"},
                {"&#923;", "&Lambda;", "Λ ", "greek capital letter lambda"},
                {"&#924;", "&Mu;", "Μ ", "greek capital letter mu"},
                {"&#925;", "&Nu;", "Ν ", "greek capital letter nu"},
                {"&#926;", "&Xi;", "Ξ ", "greek capital letter xi"},
                {"&#927;", "&Omicron;", "Ο ", "greek capital letter omicron"},
                {"&#928;", "&Pi;", "Π ", "greek capital letter pi"},
                {"&#929;", "&Rho;", "Ρ ", "greek capital letter rho"},
                {"&#931;", "&Sigma;", "Σ ", "greek capital letter sigma"},
                {"&#932;", "&Tau;", "Τ ", "greek capital letter tau"},
                {"&#933;", "&Upsilon;", "Υ ", "greek capital letter upsilon"},
                {"&#934;", "&Phi;", "Φ ", "greek capital letter phi"},
                {"&#935;", "&Chi;", "Χ ", "greek capital letter chi"},
                {"&#936;", "&Psi;", "Ψ ", "greek capital letter psi"},
                {"&#937;", "&Omega;", "Ω ", "greek capital letter omega"},
                {"&#945;", "&alpha;", "α ", "greek small letter alpha"},
                {"&#946;", "&beta;", "β ", "greek small letter beta"},
                {"&#947;", "&gamma;", "γ ", "greek small letter gamma"},
                {"&#948;", "&delta;", "δ ", "greek small letter delta"},
                {"&#949;", "&epsilon;", "ε ", "greek small letter epsilon"},
                {"&#950;", "&zeta;", "ζ ", "greek small letter zeta"},
                {"&#951;", "&eta;", "η ", "greek small letter eta"},
                {"&#952;", "&theta;", "θ ", "greek small letter theta"},
                {"&#953;", "&iota;", "ι ", "greek small letter iota"},
                {"&#954;", "&kappa;", "κ ", "greek small letter kappa"},
                {"&#955;", "&lambda;", "λ ", "greek small letter lambda"},
                {"&#956;", "&mu;", "μ ", "greek small letter mu"},
                {"&#957;", "&nu;", "ν ", "greek small letter nu"},
                {"&#958;", "&xi;", "ξ ", "greek small letter xi"},
                {"&#959;", "&omicron;", "ο ", "greek small letter omicron"},
                {"&#960;", "&pi;", "π ", "greek small letter pi"},
                {"&#961;", "&rho;", "ρ ", "greek small letter rho"},
                {"&#962;", "&sigmaf;", "ς ", "greek small letter final sigma"},
                {"&#963;", "&sigma;", "σ ", "greek small letter sigma"},
                {"&#964;", "&tau;", "τ ", "greek small letter tau"},
                {"&#965;", "&upsilon;", "υ ", "greek small letter upsilon"},
                {"&#966;", "&phi;", "φ ", "greek small letter phi"},
                {"&#967;", "&chi;", "χ ", "greek small letter chi"},
                {"&#968;", "&psi;", "ψ ", "greek small letter psi"},
                {"&#969;", "&omega;", "ω ", "greek small letter omega"},
                {"&#977;", "&thetasym;", "ϑ ", "greek small letter theta symbol"},
                {"&#978;", "&upsih;", "ϒ ", "greek upsilon with hook symbol"},
                {"&#982;", "&piv;", "ϖ ", "greek pi symbol"},
                {"&#8226;", "&bull;", "•", "bullet = black small circle"},
                {"&#8230;", "&hellip;", "…", "horizontal ellipsis = three dot leader"},
                {"&#8242;", "&prime;", "′", "prime = minutes = feet"},
                {"&#8243;", "&Prime;", "″", "double prime = seconds = inches"},
                {"&#8254;", "&oline;", "‾", "overline = spacing overscore"},
                {"&#8260;", "&frasl;", "⁄", "fraction slash"},
                {"&#8472;", "&weierp;", "℘", "script capital P = power set = Weierstrass p"},
                {"&#8465;", "&image;", "ℑ", "blackletter capital I = imaginary part"},
                {"&#8476;", "&real;", "ℜ", "blackletter capital R = real part symbol"},
                {"&#8482;", "&trade;", "™", "trade mark sign"},
                {"&#8501;", "&alefsym;", "ℵ", "alef symbol = first transfinite cardinal"},
                {"&#8592;", "&larr;", "←", "leftwards arrow"},
                {"&#8593;", "&uarr;", "↑", "upwards arrow"},
                {"&#8594;", "&rarr;", "→", "rightwards arrow"},
                {"&#8595;", "&darr;", "↓", "downwards arrow"},
                {"&#8596;", "&harr;", "↔", "left right arrow"},
                {"&#8629;", "&crarr;", "↵", "downwards arrow with corner leftwards = carriage return"},
                {"&#8656;", "&lArr;", "⇐", "leftwards double arrow"},
                {"&#8657;", "&uArr;", "⇑", "upwards double arrow"},
                {"&#8658;", "&rArr;", "⇒", "rightwards double arrow"},
                {"&#8659;", "&dArr;", "⇓", "downwards double arrow"},
                {"&#8660;", "&hArr;", "⇔", "left right double arrow"},
                {"&#8704;", "&forall;", "∀", "for all"},
                {"&#8706;", "&part;", "∂", "partial differential"},
                {"&#8707;", "&exist;", "∃", "there exists"},
                {"&#8709;", "&empty;", "∅", "empty set = null set = diameter"},
                {"&#8711;", "&nabla;", "∇", "nabla = backward difference"},
                {"&#8712;", "&isin;", "∈", "element of"},
                {"&#8713;", "&notin;", "∉", "not an element of"},
                {"&#8715;", "&ni;", "∋", "contains as member"},
                {"&#8719;", "&prod;", "∏", "n-ary product = product sign"},
                {"&#8721;", "&sum;", "∑", "n-ary sumation"},
                {"&#8722;", "&minus;", "−", "minus sign"},
                {"&#8727;", "&lowast;", "∗", "asterisk operator"},
                {"&#8730;", "&radic;", "√", "square root = radical sign"},
                {"&#8733;", "&prop;", "∝", "proportional to"},
                {"&#8734;", "&infin;", "∞", "infinity"},
                {"&#8736;", "&ang;", "∠", "angle"},
                {"&#8743;", "&and;", "∧", "logical and = wedge"},
                {"&#8744;", "&or;", "∨", "logical or = vee"},
                {"&#8745;", "&cap;", "∩", "intersection = cap"},
                {"&#8746;", "&cup;", "∪", "union = cup"},
                {"&#8747;", "&int;", "∫", "integral"},
                {"&#8756;", "&there4;", "∴", "therefore"},
                {"&#8764;", "&sim;", "∼", "tilde operator = varies with = similar to"},
                {"&#8773;", "&cong;", "≅", "approximately equal to"},
                {"&#8776;", "&asymp;", "≈", "almost equal to = asymptotic to"},
                {"&#8800;", "&ne;", "≠", "not equal to"},
                {"&#8801;", "&equiv;", "≡", "identical to"},
                {"&#8804;", "&le;", "≤", "less-than or equal to"},
                {"&#8805;", "&ge;", "≥", "greater-than or equal to"},
                {"&#8834;", "&sub;", "⊂", "subset of"},
                {"&#8835;", "&sup;", "⊃", "superset of"},
                {"&#8836;", "&nsub;", "⊄", "not a subset of"},
                {"&#8838;", "&sube;", "⊆", "subset of or equal to"},
                {"&#8839;", "&supe;", "⊇", "superset of or equal to"},
                {"&#8853;", "&oplus;", "⊕", "circled plus = direct sum"},
                {"&#8855;", "&otimes;", "⊗", "circled times = vector product"},
                {"&#8869;", "&perp;", "⊥", "up tack = orthogonal to = perpendicular"},
                {"&#8901;", "&sdot;", "⋅", "dot operator"},
                {"&#8968;", "&lceil;", "⌈", "left ceiling = apl upstile"},
                {"&#8969;", "&rceil;", "⌉", "right ceiling"},
                {"&#8970;", "&lfloor;", "⌊", "left floor = apl downstile"},
                {"&#8971;", "&rfloor;", "⌋", "right floor"},
                {"&#9001;", "&lang;", "〈", "left-pointing angle bracket = bra"},
                {"&#9002;", "&rang;", "〉", "right-pointing angle bracket = ket"},
                {"&#9674;", "&loz;", "◊", "lozenge"},
                {"&#9824;", "&spades;", "♠", "black spade suit"},
                {"&#9827;", "&clubs;", "♣", "black club suit = shamrock"},
                {"&#9829;", "&hearts;", "♥", "black heart suit = valentine"},
                {"&#9830;", "&diams;", "♦", "black diamond suit"},
                {"&#34;", "&quot;", "\"", "quotation mark = APL quote"},
                {"&#38;", "&amp;", "&", "ampersand"},
                {"&#60;", "&lt;", "<", "less-than sign"},
                {"&#62;", "&gt;", ">", "greater-than sign"},
                {"&#338;", "&OElig;", "Œ", "latin capital ligature OE"},
                {"&#339;", "&oelig;", "œ", "latin small ligature oe"},
                {"&#352;", "&Scaron;", "Š", "latin capital letter S with caron"},
                {"&#353;", "&scaron;", "š", "latin small letter s with caron"},
                {"&#376;", "&Yuml;", "Ÿ", "latin capital letter Y with diaeresis"},
                {"&#710;", "&circ;", "ˆ", "modifier letter circumflex accent"},
                {"&#732;", "&tilde;", "˜", "small tilde"},
                {"&#8194;", "&ensp;", " ", "en space"},
                {"&#8195;", "&emsp;", " ", "em space"},
                {"&#8201;", "&thinsp;", " ", "thin space"},
                {"&#8204;", "&zwnj;", "‌", "zero width non-joiner"},
                {"&#8205;", "&zwj;", "‍", "zero width joiner"},
                {"&#8206;", "&lrm;", "‎", "left-to-right mark"},
                {"&#8207;", "&rlm;", "‏", "right-to-left mark"},
                {"&#8211;", "&ndash;", "–", "en dash"},
                {"&#8212;", "&mdash;", "—", "em dash"},
                {"&#8216;", "&lsquo;", "‘", "left single quotation mark"},
                {"&#8217;", "&rsquo;", "’", "right single quotation mark"},
                {"&#8218;", "&sbquo;", "‚", "single low-9 quotation mark"},
                {"&#8220;", "&ldquo;", "“", "left double quotation mark"},
                {"&#8221;", "&rdquo;", "”", "right double quotation mark"},
                {"&#8222;", "&bdquo;", "„", "double low-9 quotation mark"},
                {"&#8224;", "&dagger;", "†", "dagger"},
                {"&#8225;", "&Dagger;", "‡", "double dagger"},
                {"&#8240;", "&permil;", "‰", "per mille sign"},
                {"&#8249;", "&lsaquo;", "‹", "single left-pointing angle quotation mark"},
                {"&#8250;", "&rsaquo;", "›", "single right-pointing angle quotation mark"},
                {"&#8364;", "&euro;", "€", "euro sign"}
};
#endif